﻿@model IEnumerable<MvcGraduate.Models.Article>

<div class="share_art">
    @if (Model != null)
    {
        var i = 0;
        foreach (var item in Model)
        {
            if (i++ == 3)
            {
                break;
            }
            <div class="my_art_detailed">
                <div class="line1">
                    [@Convert.ToDateTime(item.Time).ToString("d")]<span>@Html.DisplayFor(modelItem => item.Title)</span>
                </div>
                <div class="line2">@Html.Raw(item.Contents))</div>
                <div class="line3">
                    <span>
                        <a href="javascript:void();" onclick="window.open('@Url.Action("Details_Article", "Interaction", new { id = item.ID })', '', 'height=500,width=820,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=200,top=100,resizable=yes');">查看详细</a>|
                        <a href="javascript:void();">评论</a>|
                        <a href="javascript:void();">分享</a>
                    </span>
                </div>
            </div>
        }
        //防止没有文章
        if (i != 3)
        {
            for(int j=i;j<3;j++)
            { 
                <div class="my_art_detailed">
                    <div class="line1">
                    </div>
                    <div class="line2"></div>
                    <div class="line3">
                    </div>
                </div>
            }
        }
    }
</div>
